#include <iostream>
#include <math.h>
using namespace std;
int main ()
{
int M, D;
cout << "M =";
cin >> M;
D = M/1000;
cout <<"D = "<<D << "tonn";
return 0;
}
